import edu.ntnu.controller.*;
import edu.wsu.KheperaSimulator.RobotController;

/**
 * Main robot controller
 */
public class Robot extends RobotController {
	
	private Strategy strategy;
	
	public Robot() {
		super();
		strategy = new Strategy(this);
	}

	/**
	 * Indicates that the application has finished using the controller, and that any
	 * resources being used may be released. The starting thread invokes the object's
	 * <code>close</code> method only when <code>doWork</code> has returned and is not
	 * scheuled to be called again.
	 * @exception java.lang.Exception Exception
	 */
	public void close() throws java.lang.Exception{
	}

	/**
	 * When an object implementing the interface <code>Controller</code> is used to
	 * create a thread, the starting thread causes the objects
	 * <code>doWork</code> method to be called.  This method is called repeatedly and
	 * may perform any task.  The time needed for <code>doWork</code> to complete is
	 * not significant with respect to the next invocation of this method.
	 * @exception java.lang.Exception Exception
	 */
	public void doWork() throws java.lang.Exception{
		strategy.doAction();
	}
	
}
